#ifndef TESTWIDGET_H
#define TESTWIDGET_H

#include <QWidget>
#include<QMutex>
namespace Ui {
class TestWidget;
}

class TestWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TestWidget(QWidget *parent = nullptr);
    ~TestWidget();

    //懒汉式单例
    static TestWidget*getInstance();
    static void release();

private slots:

    void testSlot();

private:
    Ui::TestWidget *ui;
    //类内声明
    static TestWidget*m_instance;
    static QMutex m_mutex;
};

#endif // TESTWIDGET_H
